package com.education.web.api.admin.service;



import com.education.web.common.core.base.BaseService;
import com.education.web.api.admin.mapper.SystemDictMapper;
import com.education.web.entity.SystemDict;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;


/**
 * @author zengjintao
 * @version 1.0
 * @create_at 2020/3/9 21:16
 */
@Service
public class SystemDictService extends BaseService<SystemDictMapper, SystemDict> {

    @Autowired
    private SystemDictValueService systemDictValueService;

    @Transactional
    public void deleteById(Integer id) {
        super.removeById(id);
        // 删除字典类型值
        systemDictValueService.deleteByDictId(id);
    }
}
